package org.oy.sealogger.ui;

import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;

public class Depth {
	
	private String depthString = " - ";
	
	private Image depth;
	private ImageLoader imageLoader = new ImageLoader();

	public Depth() {
		depth = imageLoader.getImage("DEPTH.png");	
	}
	
	
	public void draw(Graphics g, int x, int y, int w, int h) {
		Graphics2D g2 = (Graphics2D)g;
		
		g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.8f));
		
		//FIXME
		g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
		g2.drawImage(depth, x, y, w, h, this.imageLoader);	
	}
	
	
	
	
	/**public void draw(Graphics g, int x, int y) {
		Graphics2D g2 = (Graphics2D)g;
		
		g2.setPaint(Color.YELLOW);
	    g2.setFont(new Font("Arial", Font.BOLD, 30));
	    g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.7f));
		g2.drawString("DEPTH", x, y);
		
		g2.setPaint(Color.ORANGE);
        g2.setFont(new Font("Arial", Font.BOLD, 50));
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.7f));
		g2.drawString(this.depthString, x + 15, y + 50);
	}**/
	
	
}
